<?php
/**
 *
 * Copyright 2012 Sitdhibong Laokok
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 **/

class SLCode_Generated_Image_QRCode {

	/**
	 * Google Chart URL
	 **/
	private static $GOOGLE_CHART_URL = "https://chart.googleapis.com/chart";

	/**
	 * QRCode Data Available Encode
	 **/
	public static $SLCodeQRCodeUTF8Encode		= 'UTF-8';
	public static $SLCodeQRCodeShiftJISEncode 	= 'Shift_JIS';
	public static $SLCodeQRCodeISO88591Encode 	= 'ISO-8859-1';

	/**
	 * Error Correction Level
	 **/
	public static $SLCodeQRCodeErrorCorrectionLLevel = 'L';
	public static $SLCodeQRCodeErrorCorrectionMLevel = 'M';
	public static $SLCodeQRCodeErrorCorrectionQLevel = 'Q';
	public static $SLCodeQRCodeErrorCorrectionHLevel = 'H';

	/**
	 * Class Properties
	 **/
	private $properties = array(
								'margin' => 4
							);

	/**
	 * Class Instance
	 **/
	private static $instance = null;

	public function __construct() {

	}

	public static function getInstance() {
		if ( null === SLCode_Generated_Image_QRCode::$instance ) 
			SLCode_Generated_Image_QRCode::$instance = new SLCode_Generated_Image_QRCode() ;

		return SLCode_Generated_Image_QRCode::$instance ; 
	}

	public function __get( $key ) {
		return null;
	}

	public function __set( $key, $value ) {

	}

	public static function qrcode() {
		$qrcode = SLCode_Generated_Image_QRCode::getInstance();
		return var_dump( $qrcode );
	}

}

// echo SLCode_Generated_Image_QRCode::qrcode();
